Micron Document




Python (programming language)
part 19/106 · 174.3 KB total
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Python does not support tail call optimization or first-class continuations; according to Van Rossum, the language never will.cite-ref-autont-55-87-0[84]cite-ref-autont-56-88-0[85] However, better support for coroutine-like functionality is provided by extending Python's generators.cite-ref-autont-57-89-0[86] Before 2.5, generators were lazy iterators; data was passed unidirectionally out of the generator. From Python 2.5 on, it is possible to pass data back into a generator function; and from version 3.3, data can be passed through multiple stack levels.cite-ref-autont-58-90-0[87]

Expressions

Python's expressions include the following:

• The +, -, and * operators for mathematical addition, subtraction, and multiplication are similar to other languages, but the behavior of division differs. There are two types of division in Python: floor division (or integer division) //, and floating-point division /.cite-ref-91[88] Python uses the ** operator for exponentiation.
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────